function [number, RoL] = extract_leading_number(s)
  % If input string s begins with a number, this is returned, as a double, 
  % in output number, along with the rest of the line in RoL; 
  % otherwise, number is empty and RoL = s (less any leading/trailing white space)
  %
  % Author: David Goldsmith, Wash. State Dept. of Ecology, dgol461@ecy.wa.gov
  % Release date: 9/15/2011

    s = strtrim(s);
    number = [];
    for i=1:length(s)
        if isstrprop(s(i), 'wspace')
            break
        elseif any('+-'==s(i))
            continue
        end
        tmp = str2double(s(1:i));
        if isnan(tmp)
            break
        else
            number = tmp;
        end
    end
    RoL = s(i:end);
end